<!DOCTYPE html>
<html xmlns:mml="http://www.w3.org/1998/Math/MathML">
  <head>
    <title>eLife Lens</title>
    <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,400italic,600italic' rel='stylesheet' type='text/css'>
    
    <link rel="stylesheet" type="text/css" media="all" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" />

    <!-- A combined lens.css will be generated in the bundling process -->
    <!-- While in development, separate links for each CSS file are added, so we don't need a source map -->
    <link href='lens.css' rel='stylesheet' type='text/css'/>
    <script src="lib/jquery.min.js"></script>

    <!-- MathJax Configuration -->
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        jax: ["input/TeX", "input/MathML","output/HTML-CSS"],
        SVG: { linebreaks: { automatic: true }, EqnChunk: 9999  },
        "displayAlign": "left",
        styles: {".MathJax_Display": {padding: "0em 0em 0em 3em" },".MathJax_SVG_Display": {padding: "0em 0em 0em 3em" }}
      });
    </script>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

    <script src='lens.js'></script>
    
    <script>
    
      // Little helper used to parse query strings from urls
      // --------
      //
      
      var qs = function () {
        var query_string = {};
        var query = window.location.search.substring(1);
        var vars = query.split("&");
        for (var i=0;i<vars.length;i++) {
          var pair = vars[i].split("=");
            // If first entry with this name
          if (typeof query_string[pair[0]] === "undefined") {
            query_string[pair[0]] = pair[1];
            // If second entry with this name
          } else if (typeof query_string[pair[0]] === "string") {
            var arr = [ query_string[pair[0]], pair[1] ];
            query_string[pair[0]] = arr;
            // If third or later entry with this name
          } else {
            query_string[pair[0]].push(pair[1]);
          }
        }
        return query_string;
      } ();
      
      // This document gets loaded by default
      // --------
      
      var documentURL = "https://s3.amazonaws.com/elife-cdn/elife-articles/00778/elife00778.xml";
      
      $(function() {
      
        // Create a new Lens app instance
        // --------
        //
        // Injects itself into body
      
        var app = new window.Lens({
          document_url: qs.url ? decodeURIComponent(qs.url) : documentURL
        });
      
        app.start();
      
        window.app = app;
      
      });
    
    </script>

  </head>
  <body class="loading">

  </body>
</html>
